package br.ucb.jogo.conexao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MyConnection {
	
	private static final String URL = "jdbc:mysql://localhost:3306/jogo", USER = "root", PASS = "root", NAME = "com.mysql.jdbc.Driver" ;
	
	
	public static Connection init() throws SQLException{
		Connection con = null;
		try {
			Class.forName(NAME);
			con = DriverManager.getConnection(URL, USER, PASS);			
		} catch (ClassNotFoundException e) {
			throw new SQLException();
		}
		return con;
		
	}

}
